﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ecdl.demo.resources {
    public class EcdlResources{
        private const string RESOURCE_PATH = "res/taskfiles";

        public static string GetResourceUri(String relativePath) {
            return ResolveRelativePath(relativePath);
        }

        private static string ResolveRelativePath(string relativePath) {
            string baseDirectory = Path.GetDirectoryName(typeof(EcdlResources).Assembly.Location);
            string baseDir = Path.Combine(baseDirectory, RESOURCE_PATH);

            return Path.Combine(baseDir, relativePath);
        }
    }
}
